<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>物品展示</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            width: 2650px;
            background-color: #1a1a1a;
            color: #e0e0e0;
            margin: 0;
            padding: 10px;
            box-sizing: border-box;
        }

        .info_box {
            display: grid;
            grid-template-columns: repeat(20, 1fr);
            gap: 10px;
            max-width: 2260px;
            width: 100%;
        }

        .role_separate_line {
            grid-column: span 20;
            font-size: 18px;
            font-weight: bold;
            margin-top: 20px;
            margin-bottom: 10px;
            color: #ffcc00;
        }

        .type_box {
            grid-column: span 20;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .material-box {
            position: relative;
            background-color: #2a2a2a;
            border: 1px solid #444;
            border-radius: 8px;
            overflow: hidden;
            text-align: center;
            padding: 10px;
            width: 100px;
            height: 120px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .material-box:hover {
            transform: translateY(-3px);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
        }

        .material img {
            max-width: 100%;
            height: auto;
            border-radius: 4px;
        }

        .material-num {
            position: absolute;
            top: 5px;
            right: 5px;
            background-color: rgba(0, 0, 0, 0.7);
            color: #fff;
            padding: 3px 6px;
            font-size: 12px;
            border-radius: 4px;
        }

        .material-name {
            margin-top: 5px;
            font-size: 12px;
            color: #fff;
        }

        .footer {
            text-align: center;
            padding: 20px 0;
            font-size: 14px;
            color: #888;
            margin-top: 30px;
        }
    </style>
</head>

<body>
    <div class="info_box">
        {{each materials material type}}
        <div class="role_separate_line">{{type}}</div>
        <div class="type_box">
            {{each material val}}
            <div class="material-box">
                <div class="material">
                    <img class="item-icon star{{val.level}}"
                        src="{{itemsImgs.imgs[val.name]?`${pluResPath}${itemsImgs.imgs[val.name]}`:`${itemsImgs.icons[val.name]}`}}" />
                    <div class="material-num">{{val.num}}</div>
                </div>
                <div class="material-name">{{val.name}}</div>
            </div>
            {{/each}}
        </div>
        {{/each}}
    </div>
    <footer class="footer">
        <p>功能作者: Tloml-Starry | QQ: 1947425850</p>
    </footer>
</body>

</html>
